/**
 * @brief: 
 *
 * @author: dariaye@tencent.com
 * @date: 2012-7-17
 * @version: 1.0
 * @changes:
 *    <author>        <time>        <version >        <desc>
 *     dariaye             2012-7-17              1.0                 Create
 *
 */

#ifndef WALLE_COMMON_GLOBAL_DEF_H
#define WALLE_COMMON_GLOBAL_DEF_H

#include <inttypes.h>

#include "namespace.h"

#define WL_DECIDE -1
// MPI have defined "typedef int MPI_Comm"
// SO, we assign layout.comm = -1 for local communicator
#define LOCAL_COMM -1

#ifdef WITH_64BIT
typedef int64_t WLInt;
typedef uint64_t WLUInt;
#define MPIU_INT MPI_UNSIGNED_LONG
#define PRd64 "lld"
#define PRu64 "llu"
#else
typedef int32_t WLInt;
typedef uint32_t WLUInt;
#define MPIU_INT MPI_UNSIGNED
#define PRd64 "d"
#define PRu64 "u"
#endif

typedef double WLDouble;

#endif /* WALLE_COMMON_GLOBAL_DEF_H */
